﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tao.FreeGlut;

namespace AvantGameMachine.Input.Keyboard
{
    public class KeyboardEventData
    {
        private Keys key;
        private int x;
        private int y;
        private bool pressed;

        internal KeyboardEventData(byte _key,int _keySpecial,int _x,int _y,bool _isspecial,bool _pressed)
        {

            if (_isspecial)
            {
                key = (Keys)_keySpecial + byte.MaxValue;
            }
            else
            {
                key = (Keys)_key;
            }
            x = _x;
            y = _y;
            pressed = _pressed;
        }

        public int X
        {
            get { return x; }
        }

        public int Y
        {
            get { return x; }
        }

        public Keys Key
        {
            get { return key; }
        }

        public bool Pressed
        {
            get { return pressed; }
        }

        public bool Released
        {
            get { return !pressed; }
        }
    }
}
